package com.sky.mapper.user;

import com.sky.pojo.Setmeal;
import com.sky.vo.DishItemVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserSetmealMapper {

    List<Setmeal> list(Setmeal setmeal);

    @Select("select s.name, s.copies, d.image, d.description " +
            "from setmeal_dish s left join dish d on s.dish_id = d.id " +
            "where s.setmeal_id = #{setmealId}")
    List<DishItemVO> query(Integer setmealId);
}
